- Dialectic of Research in Computing Science: models of argument, proof methods (demonstration, empirical, mathematical).
- Deduction and Induction for Computer Science: theoretical models and approaches, algorithmic and software engineering approaches, mathematical modelling, performance estimation and evaluation.
Course outcome addressed — CO2: Utilize various investigative approaches and methodologies for problem-solving in computing science research.
Unit II is the largest unit of this course (13 lecture hours) and carries the highest weight in the examination. It answers one central question: once you have a research problem, how do you actually prove that your answer is correct?
The unit has two halves:
- Part A — How we argue and prove (Sections 2–4): dialectic, models of argument, and the three proof methods.
- Part B — How we investigate (Sections 5–10): deduction and induction, and the four research approaches of computing science, ending with performance evaluation.
Answer pattern for the exam remains: definition → numbered points → computer-science example.
Where this unit is examined. The mid-semester paper covers Units I–III, but it draws on this unit only lightly — typically a single question on deduction versus induction (Section 5), which is the one topic here you must have ready for the mid-semester. The remainder of Unit II — dialectic, models of argument, the three proof methods, mathematical modelling and performance evaluation — carries its full weight in the end-semester paper, where this is the largest unit on the syllabus. Prepare Section 5 thoroughly now; do not postpone the rest, but do not let it crowd out Units I and III before the mid-semester.
1. Introduction: The Nature of Computing Science Research
Computer Science is an unusual discipline. It is partly mathematics, partly natural science and partly engineering. Because of this, it accepts more than one kind of evidence, and a researcher must know which kind of evidence his or her particular question demands.
1.1 The Three Paradigms of Computing
- Theory (the mathematics paradigm). Rooted in mathematics. The researcher defines objects, states theorems, and proves them. Steps: definition → theorem → proof → interpretation. Example: proving that a problem is NP-complete.
- Abstraction (the scientific paradigm). Rooted in experimental science. The researcher forms a hypothesis, constructs a model, designs an experiment, collects data and analyses it. Example: hypothesising and then measuring how cache size affects execution time.
- Design (the engineering paradigm). Rooted in engineering. The researcher states requirements and specifications, designs and implements a system, and then tests it. Example: designing a new distributed file system and evaluating it.
The three paradigms are a very convenient opening paragraph for almost any 10-mark question in this unit, because they explain why computing science accepts three different proof methods — one for each paradigm.
1.2 Why a Method is Necessary
A result in computing science is accepted not because the researcher is confident, but because the method used to obtain it can withstand examination. The method is the guarantee; the result is only the outcome.
2. The Dialectic of Research in Computing Science
2.1 Meaning of Dialectic
Dialectic is the method of arriving at truth through structured argument and counter-argument — a claim is proposed, it is challenged by opposing evidence or reasoning, and out of this opposition a refined, better-supported claim emerges.
The word comes from the Greek dialektike, meaning the art of debate. In research it means that knowledge is not created by one person announcing a fact; it is created by a community testing that fact until it survives.
2.2 The Classical Dialectical Triad
- Thesis: the initial claim or position. “Algorithm A is faster than Algorithm B.”
- Antithesis: the opposition, objection or contradictory evidence. “Algorithm A is faster only for small inputs; for large inputs its memory use causes thrashing.”
- Synthesis: the refined position that accounts for both. “Algorithm A outperforms B for inputs below the cache size; beyond that, B is superior.”
The synthesis then becomes a new thesis, and the cycle repeats. This is why research is described as cyclical rather than linear.
2.3 How the Dialectic Operates in Computing Science
- Peer review. A paper is sent to reviewers whose professional duty is to doubt it. Their objections are the antithesis; the revised paper is the synthesis.
- Conference discussion and rebuttal. Presentation is followed by questions that attack assumptions, baselines and generality.
- Replication and refutation. Later researchers repeat the experiment. If the result does not reproduce, the claim is weakened or withdrawn.
- Competing methods and benchmarks. Shared datasets and benchmark suites (SPEC, TPC, ImageNet, CIC-IDS) exist precisely so that rival claims can be compared on neutral ground.
- Counterexamples. In theory, one valid counterexample destroys a universal claim permanently.
- The “Related Work” and “Threats to Validity” sections of a paper are dialectic written down: the author states rival positions and the weaknesses of his or her own work.
2.4 Importance of the Dialectical Method
- It removes personal bias, because a claim must survive people who want it to fail.
- It exposes hidden assumptions that the author could not see.
- It improves the precision of claims — vague claims cannot survive attack.
- It builds cumulative, reliable knowledge instead of isolated opinions.
- It protects the discipline against error, exaggeration and fraud.
- It generates new research problems, since every unresolved objection is a fresh gap.
Students often write a project report as a diary — “first we did this, then we did that”. A research report is not a diary; it is one side of an argument addressed to a reader who is professionally obliged to doubt you. Write to convince a sceptic, not to describe your week.
3. Models of Argument
3.1 What is an Argument in Research?
An argument is a structured set of statements in which certain statements (the evidence or premises) are offered as reasons to accept another statement (the claim or conclusion), together with the reasoning that connects them.
An argument is not a quarrel. It is the logical skeleton of every research paper.
3.2 The Toulmin Model of Argument
The most widely used model of argument has six components. This is a standard 10-mark question — learn all six with one running example.
- Claim. The conclusion you want the reader to accept.
“Our caching scheme reduces average page-load time.” - Evidence (Data / Grounds). The facts, measurements or proofs that support
the claim.
“Across 500 page loads, the mean load time fell from 820 ms to 610 ms.” - Warrant. The reasoning that connects the evidence to the claim — the
bridge that explains why this evidence supports this claim. This is the component students
most often omit.
“A statistically significant reduction in measured mean load time under an identical workload indicates an improvement caused by the caching scheme.” - Backing. Support for the warrant itself — established theory, accepted
practice or prior literature that makes the warrant credible.
“Controlled benchmarking with repeated trials is the accepted evaluation method in systems research.” - Qualifier. The words that limit the strength or scope of the claim:
usually, in most cases, for workloads of this type, with 95% confidence. A qualifier makes
a claim honest and defensible.
“For read-heavy workloads, load time is reduced by 20–28%.” - Rebuttal. The stated conditions under which the claim would not
hold, and the researcher's response to anticipated objections.
“For write-heavy workloads the invalidation cost dominates and no improvement is observed.”
3.3 Types of Argument Used in Computing Science
- Deductive argument. From general principles to a specific, necessary conclusion. If the premises are true, the conclusion must be true. Example: every comparison-based sort requires Ω(n log n) comparisons; MergeSort is comparison-based; therefore MergeSort cannot beat Ω(n log n).
- Inductive argument. From specific observations to a general, probable conclusion. Example: the system crashed under high load on 28 separate occasions; therefore it probably crashes under high load in general.
- Abductive argument (inference to the best explanation). From an observation to the most plausible cause. Example: response time spikes exactly when the garbage collector runs; therefore GC pauses are the most likely cause. Abduction generates hypotheses; it does not prove them.
- Argument by analogy. A conclusion drawn because two situations are similar in relevant respects. Example: a technique that improved TCP congestion control may improve congestion control in a data-centre protocol. Analogy suggests; it never proves.
- Argument by authority or citation. Relying on established, peer-reviewed results. Legitimate when the source is reliable and relevant; a fallacy when it replaces evidence.
- Argument by counterexample. Disproving a universal claim by exhibiting a single case that violates it. Extremely powerful in theoretical computing.
3.4 Structure of the Argument in a Research Paper
| Paper section | Its role in the argument |
|---|---|
| Introduction | States the problem and the claim; establishes significance. |
| Related Work | Establishes novelty; states and answers rival positions (backing, antithesis). |
| Method | States the warrant — why this way of gathering evidence is valid (the research paradigm). |
| Results | Presents the evidence. |
| Discussion | Connects evidence to claim; supplies qualifiers (the warrant in prose). |
| Limitations (Threats to Validity) | States the rebuttal honestly. |
| Conclusion | Restates the qualified claim and its contribution. |
3.5 Logical Fallacies to Avoid
A logical fallacy is an error in the reasoning that connects evidence to a claim, not an error in the evidence itself. An argument can commit a fallacy and still reach a conclusion that happens to be true — what fails is not the data but the link between warrant and claim (recall the Toulmin model, Section 3.2): the argument does not actually justify what it claims to justify.
This matters because a reviewer's objection is almost never “your numbers are wrong”; it is far more often “your numbers do not support what you are claiming from them”. Fallacies are usually grouped into two families:
- Formal fallacies: the structure of a deductive argument is itself invalid, regardless of the subject matter. Example: “if the cache were the bottleneck, throughput would fall under load; throughput fell under load; therefore the cache is the bottleneck” — this affirms the consequent and silently ignores every other possible cause of the slowdown.
- Informal fallacies: the structure looks fine, but a premise is irrelevant, unsupported, or smuggled in from insufficient data, rhetoric or authority rather than evidence. Almost all of the fallacies below are informal, and they are the ones that recur most often in empirical computing-science papers and B.Tech./M.Tech. project reports.
- Hasty generalization: concluding from too few observations (one run, one dataset). Example: calling a new caching policy “superior” after testing it on a single benchmark trace.
- Post hoc ergo propter hoc: assuming that because B followed A, A caused B. Example: latency dropped after a runtime upgrade, so the upgrade is credited, while a simultaneous hardware change is ignored.
- Cherry-picking: reporting only the favourable results. Example: publishing the best of ten experimental runs and omitting the other nine.
- Straw man: comparing against a deliberately weak or badly configured baseline. Example: benchmarking a proposed algorithm only against an unoptimised brute-force implementation.
- Circular reasoning: assuming in the premises what the conclusion is meant to prove. Example: “the protocol is secure because it follows secure design principles, and it follows secure design principles because it is secure”.
- Appeal to authority: “it must be right, a famous group published it”. Example: adopting a design choice uncritically because a well-known lab used it, without checking whether it fits the current problem.
- False dichotomy: presenting only two options when more exist. Example: “either accept O(n2) blow-up or use my algorithm”, ignoring hybrid or approximate approaches.
- Correlation–causation confusion: treating an association as a cause. Example: memory usage and crash rate both rise across software versions, so memory growth is blamed, when a third factor (a shared dependency update) could explain both.
For a 5-mark answer: name the fallacy, define it in one line, and give a computing-science example — exactly the pattern used above. Note the fallacy first when critiquing Related Work or defending your own Discussion and Limitations sections; it is the fastest way to lose (or win) an argument with a reviewer.
4. Proof Methods in Computing Science
Computing science accepts three principal kinds of proof. Choosing the wrong one is a frequent cause of rejection.
4.1 Demonstration (Proof by Construction)
Proof by demonstration establishes a claim by actually constructing the artifact — an algorithm, program, protocol or system — and showing that it exists and works as claimed.
Characteristics
- It answers the question “Is this possible?”
- It is an existence proof: building one working instance proves feasibility.
- It is the natural method of the design/engineering paradigm.
- It is the dominant method in B.Tech. and M.Tech. projects.
Steps
- State the requirement or specification precisely.
- Design the artifact.
- Implement it.
- Show that it satisfies the specification under stated conditions.
- Report the environment, assumptions and limitations.
Strengths and limitations
- Strengths: concrete, convincing, immediately useful, produces a usable artifact.
- Limitations: proves only that it worked there, then, under those conditions; it does not prove generality, optimality or correctness in all cases.
Building a working compiler for a new language demonstrates that the language can be compiled. It does not prove that the compiler is correct for every program, nor that it is the fastest possible compiler.
4.2 Empirical Proof
Empirical proof establishes a claim by systematic observation, measurement and experiment over many cases, showing that a pattern holds with an acceptable degree of statistical confidence.
Characteristics
- It answers the question “Does this hold generally, in practice?”
- It is the method of the abstraction/scientific paradigm.
- It is inductive: the conclusion is probable, never certain.
- Its conclusions are valid only inside the range of conditions that were tested.
Requirements of a sound empirical proof
- A clearly stated hypothesis, framed before the experiment.
- A fair baseline — the best available existing method, properly configured.
- Well-defined metrics chosen in advance.
- A representative and clearly described workload and environment.
- Control of variables — only one factor changes at a time.
- Repetition — multiple runs, with mean and variation reported.
- Statistical testing — p-values, confidence intervals, effect sizes.
- Reproducibility — enough detail (versions, parameters, seeds, data) that others can repeat it.
Strengths and limitations
- Strengths: tells you what really happens in the messy real world, including effects that theory omits.
- Limitations: never certain; costly and time-consuming; results may not transfer to other hardware, data or workloads.
4.3 Mathematical Proof
Mathematical proof establishes a claim with certainty by deducing it logically from definitions, axioms and previously proved theorems, so that the claim holds in every case that satisfies the stated assumptions.
Characteristics
- It answers the question “Is this guaranteed to be always true?”
- It is the method of the theory/mathematics paradigm.
- It is deductive: if the assumptions hold, the conclusion cannot be false.
- It requires no testing — no number of experiments can add to or subtract from it.
Principal techniques of mathematical proof
- Direct proof. Assume the hypothesis and derive the conclusion by a chain of valid steps. Example: the sum of two even numbers is even.
- Proof by contraposition. To prove P ⇒ Q, prove ¬Q ⇒ ¬P. The two statements are logically equivalent. Example: to prove “if n2 is even, then n is even”, prove the contrapositive instead — “if n is odd, then n2 is odd”.
- Proof by contradiction (reductio ad absurdum). Assume the claim is false and derive an impossibility. Example: prove that there is no largest natural number — assume N is the largest; then N+1 is a larger natural number, a contradiction.
- Proof by mathematical induction. Prove the base case, assume the statement
holds for k (the induction hypothesis), and prove it for k+1.
P(1) ∧ (∀k P(k) ⇒ P(k+1)) ⇒ ∀n P(n)Example: prove 1+2+…+n = n(n+1)/2 for every n ≥ 1.
- Proof by cases. Break the problem into a finite set of possibilities and prove the claim in each one separately. Example: prove that the square of any integer is either even or odd — consider the case where the integer is even and the case where it is odd.
- Constructive proof. Prove that something exists by explicitly constructing it. Example: prove that an even prime number exists — the number 2 is even and has exactly two factors, 1 and 2, so it is prime.
4.4 Comparison of the Three Proof Methods
| Basis | Demonstration | Empirical | Mathematical |
|---|---|---|---|
| Question answered | Is it possible? | Does it hold in practice? | Is it always true? |
| Paradigm | Design/Engineering | Abstraction/Science | Theory/Mathematics |
| Reasoning | Constructive | Inductive | Deductive |
| Certainty | Existence only | Probable | Certain |
| Evidence | A working artifact | Measurements, statistics | Logical derivation |
| Scope of validity | The built instance | The tested conditions | All cases satisfying assumptions |
| Weakness | No generality | Never certain | Assumptions may not match reality |
| CS example | A prototype compiler | Benchmarking two databases | Proving a complexity bound |
Strong research combines all three: prove the algorithm correct mathematically, demonstrate that an implementation exists, and measure empirically that it actually helps. Writing this sentence, with the hostel or database example, is a reliable way to close a 10-mark answer on proof methods.
5. Deduction and Induction for Computer Science
5.1 Deductive Reasoning
Deductive reasoning proceeds from general principles to a specific conclusion. If the premises are true and the reasoning is valid, the conclusion is necessarily true.
Form
The classical form is the syllogism:
- Major premise: All comparison-based sorting algorithms require Ω(n log n) comparisons in the worst case.
- Minor premise: QuickSort is a comparison-based sorting algorithm.
- Conclusion: QuickSort requires Ω(n log n) comparisons in the worst case.
Validity vs. soundness
- An argument is valid if the conclusion follows logically from the premises.
- It is sound if it is valid and the premises are actually true.
- A valid argument with false premises gives a false conclusion — this is why assumptions must be stated explicitly.
Where deduction is used in computing
- Complexity analysis and asymptotic bounds.
- Proving algorithm correctness (invariants, induction).
- Formal verification and model checking.
- Type systems and compiler correctness.
- Database theory — normalization, query equivalence.
- Cryptographic security proofs.
- Logic programming (Prolog) and automated theorem proving.
5.2 Inductive Reasoning
Inductive reasoning proceeds from specific observations to a general conclusion. The conclusion is probable, supported by evidence, but never guaranteed.
Form
- Observation: On 28 evenings the network throughput fell after 21:00 hrs.
- Conclusion: The network throughput generally falls after 21:00 hrs.
The 29th evening may contradict this. That permanent uncertainty is called the problem of induction.
Where induction is used in computing
- All benchmarking, performance measurement and profiling.
- Software testing — passing tests suggests, but never proves, correctness.
- Machine learning — generalizing from training data to unseen data is inductive by nature.
- Empirical software engineering, user studies and surveys.
- Data mining and pattern discovery.
- Repository mining and defect prediction.
Do not confuse mathematical induction with inductive reasoning. Despite the shared name they are opposites: mathematical induction is a deductive proof technique giving certainty, whereas inductive reasoning gives only probability. This distinction is a favourite short-answer question.
5.3 Abductive Reasoning
Abduction infers the most plausible explanation for an observation. It is how debugging works: the program crashes only on large inputs, therefore a buffer overflow is the most likely explanation. Abduction generates hypotheses; deduction predicts their consequences; induction tests them.
5.4 Comparison of Deduction and Induction
| Basis | Deduction | Induction |
|---|---|---|
| Direction | General → specific | Specific → general |
| Certainty | Conclusion is certain (if premises true) | Conclusion is probable |
| Starting point | Theory, axioms, accepted laws | Observations, data, measurements |
| Adds new facts about the world? | No — it makes explicit what was implicit | Yes — it extends knowledge beyond what was observed |
| Risk | Premises may be false or unrealistic | Sample may be unrepresentative |
| Typical output | Theorem, proof, bound | Empirical law, trend, model |
| Refuted by | An error in the reasoning | A single counter-observation |
| CS example | Proving O(n log n) for MergeSort | Measuring that MergeSort beats QuickSort on your data |
5.5 The Hypothetico-Deductive Cycle
Real research uses both directions in a loop:
You observe a phenomenon, guess an explanation, deduce what must follow if the guess is right, test that prediction empirically, and revise. Deduction gives certainty about consequences; induction gives contact with reality. Research needs both.
6. Theoretical Models and Approaches
The theoretical approach studies a computing problem by abstracting it into a formal mathematical model and deriving results about that model by proof, so that the conclusions hold for every system the model represents.
6.1 Abstraction: The Central Idea
Abstraction is deliberate, careful forgetting. The researcher removes every detail that does not affect the question, leaving a clean structure that can be reasoned about exactly.
A hostel's wireless network — concrete walls, students, laptops, vendors — can be abstracted into a graph: access points become vertices and interference between them becomes edges. The problem “assign channels so that interfering access points differ” then becomes the well-studied problem of graph colouring, for which existing theorems and algorithms apply immediately.
6.2 Steps in the Theoretical Approach
- Identify the essential entities and relationships in the problem.
- Choose or construct a suitable formal model.
- State assumptions and definitions precisely.
- Formulate the claim as a theorem or lemma.
- Prove it using an appropriate proof technique.
- Interpret the result back in terms of the original real-world problem.
- State the limits of the abstraction.
6.3 Important Formal Models in Computing Science
- Automata and formal languages: finite automata, pushdown automata, Turing machines — models of computation and of what can be computed.
- Computability theory: decidability, the Halting Problem, reducibility.
- Complexity theory: classes P, NP, NP-complete, NP-hard, PSPACE; lower and upper bounds.
- Graph models: networks, dependencies, scheduling, routing, social structures.
- Mathematical logic: propositional and predicate logic, temporal logic (used to specify properties of concurrent systems).
- Lambda calculus and type theory: foundations of functional programming and type systems.
- Process algebras (CCS, CSP, π-calculus): models of concurrent and communicating systems.
- Petri nets: modelling concurrency, synchronization and deadlock.
- Queueing theory and Markov chains: models of performance and stochastic behaviour.
- Information theory: entropy, channel capacity, compression limits.
- Game theory: modelling strategic interaction in networks, auctions and security.
6.4 Formal Methods and Verification
- Formal specification: writing the required behaviour in a precise mathematical notation (Z, VDM, Alloy, TLA+).
- Theorem proving: deriving correctness with tools such as Coq, Isabelle or PVS.
- Model checking: automatically and exhaustively exploring all reachable states of a finite model to check whether a property holds; produces a counterexample trace when it fails. Tools: SPIN, NuSMV, UPPAAL.
- State-space explosion is the main practical limitation of model checking.
6.5 Strengths and Limitations
- Strengths: results are certain, general and permanent; they apply to systems that do not exist yet; they can prove impossibility, which no experiment can do.
- Limitations: the abstraction may omit factors that dominate in practice (cache behaviour, constant factors, hardware effects); asymptotically superior algorithms are sometimes slower on real input sizes; strong mathematical background is required.
7. Algorithmic Approaches
The algorithmic approach investigates a problem by designing a step-by-step procedure to solve it, proving that the procedure is correct and terminates, and analysing the computational resources it consumes.
An algorithm is not a research contribution until three things are established: it is correct, it terminates, and its cost is bounded.
7.1 Algorithm Design Paradigms
- Brute force / exhaustive search: try all possibilities. Simple, correct, usually too slow.
- Divide and conquer: split, solve recursively, combine. Example: MergeSort, FFT.
- Greedy: take the locally best choice at each step; requires proof that this yields the global optimum. Example: Dijkstra, Huffman coding.
- Dynamic programming: solve overlapping sub-problems once and store the results. Example: Floyd–Warshall, sequence alignment.
- Backtracking and branch-and-bound: systematic search with pruning. Example: N-Queens, integer programming.
- Randomized algorithms: use random choices; analysis is in terms of expected behaviour. Example: randomized QuickSort, Miller–Rabin primality test.
- Approximation algorithms: accept a provably bounded distance from optimal in exchange for polynomial running time. Example: 2-approximation for vertex cover.
- Heuristic and metaheuristic methods: genetic algorithms, simulated annealing, particle swarm. No optimality guarantee; evaluated empirically.
- Online algorithms: decisions must be made without knowledge of future input; evaluated by competitive ratio.
- Parallel and distributed algorithms: evaluated additionally by speedup, scalability and communication cost.
7.2 Proving Algorithm Correctness
- Loop invariants for iterative algorithms (initialization, maintenance, termination).
- Mathematical induction for recursive algorithms.
- Exchange argument for greedy algorithms — show that any optimal solution can be transformed into the greedy one without becoming worse.
- Optimal substructure and overlapping sub-problems for dynamic programming.
- Termination argument: identify a quantity that strictly decreases and is bounded below.
7.3 Complexity Analysis
Asymptotic notations
- O(g(n)) — asymptotic upper bound (at most).
- Ω(g(n)) — asymptotic lower bound (at least).
- Θ(g(n)) — tight bound (both).
- o(g(n)) and ω(g(n)) — strict upper and lower bounds.
Cases and kinds of analysis
- Worst case — the guarantee; most commonly reported.
- Best case — rarely useful on its own.
- Average case — requires an assumed input distribution, which must be stated.
- Amortized analysis — average cost per operation over a worst-case sequence of operations (e.g. dynamic array doubling).
- Space complexity — memory consumed, increasingly the binding constraint in practice.
- Communication and I/O complexity — dominant in distributed and big-data settings.
Recurrence relations
The running time of a recursive algorithm is expressed as a recurrence, e.g. for MergeSort:
Recurrences are solved by substitution, recursion trees, or the Master Theorem.
7.4 Empirical Algorithmics
Asymptotic analysis hides constant factors and hardware effects. Therefore theoretical analysis is normally accompanied by experimental algorithmics: implementing the algorithm, running it on realistic inputs, and measuring actual time, memory and cache behaviour. Theory tells you how the cost grows; measurement tells you what the cost is.
8. Software Engineering Approaches
The software engineering approach studies the construction, quality, evolution and use of software systems and of the processes and people that produce them, using empirical research methods drawn from the sciences.
Here the object of study is not only the program but also the process and the people. This makes the evidence noisier and the methods closer to social science.
8.1 Research Methods in Software Engineering
- Constructive / design-science research: build a new method, tool or framework and evaluate it. The most common approach in SE research and in student projects.
- Controlled experiment: subjects (often students or developers) perform tasks under controlled conditions; e.g. comparing debugging time with and without a new tool.
- Case study: in-depth investigation of one real project or organisation in its natural context; e.g. studying a migration from a monolith to microservices.
- Survey research: questionnaires or interviews with a sample of practitioners to learn practices, opinions and difficulties.
- Systematic Literature Review (SLR) and mapping study: a rigorous, protocol-driven review of all published evidence on a question, with explicit inclusion and exclusion criteria.
- Mining Software Repositories (MSR): analysing version-control history, issue trackers and code reviews to discover patterns; e.g. predicting defect-prone modules from commit history.
- Action research: the researcher participates in solving a real organisational problem and studies the intervention.
- Ethnographic / observational study: observing developers at work to understand actual practice rather than reported practice.
- Benchmarking and tool evaluation: comparing tools on common subject programs.
- Simulation of processes: modelling the software process to predict effort or defect flow.
8.2 Measurement in Software Engineering
- Product metrics: lines of code, cyclomatic complexity, coupling and cohesion, code smells, test coverage, defect density.
- Process metrics: effort, cycle time, defect removal efficiency, churn, review latency.
- Resource/people metrics: team size, experience, productivity (to be used with great caution).
- Quality models: ISO/IEC 25010 attributes — functionality, reliability, usability, efficiency, maintainability, portability, security.
8.3 Threats to Validity in Empirical SE
- Internal validity: is the observed effect really caused by the treatment, or by some uncontrolled factor?
- External validity: do results obtained with student subjects or toy programs generalize to industry?
- Construct validity: does the metric truly capture the concept (does lines-of-code really measure productivity)?
- Conclusion validity: is the statistical analysis appropriate and the sample large enough?
Software engineering research deals with human beings, so results vary widely. Never present a single case study as a universal law, and always report the context: team size, domain, language, experience and project scale.
9. Mathematical Modelling
A mathematical model is a representation of a real system using mathematical concepts, variables, equations and relationships, constructed so that the behaviour of the system can be analysed, predicted or optimized without experimenting on the system itself.
9.1 Why Model?
- To predict behaviour before a system is built — when measurement is impossible.
- To study conditions that are too costly, too large or too dangerous to create.
- To understand why a system behaves as it does, not merely that it does.
- To explore many design alternatives cheaply.
- To optimize parameters analytically.
- To provide a theoretical explanation for measured data.
9.2 Steps in Mathematical Modelling
- Identify the problem and the questions the model must answer.
- State assumptions and simplifications explicitly.
- Identify variables and parameters: input, output, state, decision variables.
- Formulate relationships as equations, inequalities or probability distributions.
- Solve the model analytically or numerically.
- Verify — is the model implemented correctly? (Are we building the model right?)
- Validate — does the model agree with reality? (Are we building the right model?)
- Perform sensitivity analysis — how do the results change when parameters vary?
- Interpret and apply the results; state the range of validity.
9.3 Classification of Models
| Classification | Description |
|---|---|
| Deterministic vs. Stochastic | Fixed outcomes vs. probabilistic outcomes (queueing, Markov). |
| Static vs. Dynamic | Behaviour at one instant vs. behaviour evolving over time. |
| Discrete vs. Continuous | Countable states/events vs. continuously varying quantities. |
| Analytical vs. Numerical | Closed-form solution vs. solution by computation/iteration. |
| Descriptive vs. Prescriptive | Explains what happens vs. recommends what should be done (optimization). |
| Linear vs. Non-linear | Proportional relationships vs. complex interactions. |
9.4 Common Mathematical Models in Computing
- Queueing models: servers, arrival rates and service rates — the standard model of CPUs, networks, disks and cloud services.
- Markov chains: systems that move between states with given probabilities — reliability, caching, PageRank.
- Graph models: routing, dependency, scheduling and social networks.
- Optimization models: linear programming, integer programming, convex optimization — used in resource allocation and scheduling.
- Probabilistic and statistical models: distributions of arrival times, failures and errors.
- Reliability models: MTBF, MTTR, availability = MTBF/(MTBF+MTTR).
- Cost and effort models: COCOMO for software effort estimation.
- Machine-learning models viewed as function approximators fitted to data.
9.5 A Worked Model: The M/M/1 Queue
Consider a single server (a CPU, a web server or a network link) with Poisson arrivals at rate λ and exponential service at rate μ.
As ρ → 1, the waiting time W grows without bound. This explains, deductively, why a server that is 95% utilized feels far worse than one that is 80% utilized, even though the difference in load appears small. No amount of measurement gives this insight as clearly as the equation does.
9.6 Little's Law
One of the most useful and general results in performance modelling:
where L is the average number of items in a system, λ the average arrival rate, and W the average time each item spends in the system. It holds for almost any stable system, regardless of the arrival or service distribution.
9.7 Verification vs. Validation of a Model
| Verification | Validation | |
|---|---|---|
| Question | Have we built the model right? | Have we built the right model? |
| Concern | Correctness of implementation and mathematics | Agreement with the real system |
| Method | Code review, testing, checking equations, extreme-value tests | Comparing model output with measured data |
9.8 Advantages and Limitations
- Advantages: inexpensive, fast, safe, allows what-if analysis, gives insight into cause and effect, applicable to systems not yet built.
- Limitations: results are only as good as the assumptions; real workloads are often not Poisson; over-simplification produces confident but wrong predictions; over-complication makes the model unsolvable.
10. Performance Estimation and Evaluation
Performance evaluation is the systematic process of determining how well a computing system, algorithm or component performs — by defining suitable metrics, selecting a representative workload, applying an appropriate evaluation technique, and comparing the result against a fair baseline.
10.1 Objectives of Performance Evaluation
- To compare two or more alternative designs, algorithms or systems.
- To identify bottlenecks in an existing system.
- To determine whether a system meets its performance requirements.
- To predict performance under future or larger loads (capacity planning).
- To tune parameters for optimal operation.
- To justify the claim made in a research paper.
10.2 Performance Metrics
- Response time / latency: time from request to response. Report the median and the 95th or 99th percentile, not only the mean.
- Throughput: work completed per unit time (requests/second, transactions/second, FLOPS).
- Utilization: fraction of time a resource is busy.
- Execution time: total time to complete a task.
- Speedup: S = Told/Tnew, or T1/Tn for parallel systems.
- Efficiency: E = S/n for n processors.
- Scalability: how performance changes as load or resources grow.
- Reliability and availability: MTBF, MTTR, uptime percentage.
- Energy and power: joules per operation — increasingly important.
- Cost: price per unit of performance.
- Accuracy-related metrics (for ML systems): accuracy, precision, recall, F1-score, AUC.
10.3 Techniques of Performance Evaluation
| Basis | Analytical Modelling | Simulation | Measurement |
|---|---|---|---|
| Stage of use | Design stage, any time | Design stage, before build | Only after the system exists |
| Cost | Lowest | Medium | Highest |
| Time required | Low | Medium | High |
| Accuracy | Low to moderate | Moderate to high | Highest (for that system) |
| Tools needed | Mathematics | Simulator (NS-3, CloudSim, GEM5) | Real system, benchmarks, profilers |
| Flexibility | Very high (change a parameter instantly) | High | Low |
| Believability | Lowest | Medium | Highest |
| Main risk | Unrealistic assumptions | Invalid model or poor random seeds | Uncontrolled environment, measurement overhead |
“Compare analytical modelling, simulation and measurement as techniques of performance evaluation” is one of the most frequently asked 10-mark questions in this unit. Reproduce this table and add the closing point: whenever possible, use at least two techniques and check that they agree — agreement between an independent model and a measurement is far stronger evidence than either alone.
10.4 Workload Characterization
- The workload is the set of requests or inputs applied to the system during evaluation.
- Real workload: actual traces from production. Most realistic, least repeatable.
- Synthetic workload: generated to resemble real behaviour. Repeatable and controllable.
- Standard benchmarks: SPEC CPU (processors), TPC-C/TPC-H (databases), LINPACK (supercomputers), YCSB (key-value stores), MLPerf (machine learning), ImageNet and CIC-IDS (datasets). Benchmarks make results comparable across research groups.
- A workload must be representative of actual use; a benchmark that exercises only the favourable path proves nothing.
10.5 Designing a Performance Experiment
- State the goal and the specific question.
- Choose the metrics before running anything.
- Identify the factors (variables you will change) and their levels.
- Identify and control the parameters you will hold constant.
- Select the workload and the baseline for comparison.
- Decide the number of repetitions; use different random seeds where applicable.
- Discard warm-up periods (cache and JIT effects) before recording.
- Run the experiment, recording the full environment.
- Analyse using appropriate statistics; report mean/median with variation.
- Present results clearly and state the limitations.
10.6 Fundamental Laws of Performance
Amdahl's Law
If a fraction p of a program can be parallelized and the remaining (1−p) is inherently sequential, then with n processors the speedup is
Interpretation: the sequential portion sets a hard ceiling on speedup. If 10% of a program is sequential, no number of processors can give more than a 10× speedup.
Gustafson's Law
For problems whose size grows with the available computing power, the scaled speedup is
Interpretation: in practice we use bigger machines to solve bigger problems, so the outlook is less pessimistic than Amdahl's Law suggests.
Little's Law
L = λW — as stated in Section 9.6.
The bottleneck principle
Overall system performance is limited by its slowest component. Optimizing a non-bottleneck component yields no improvement — a direct consequence of Amdahl's Law.
10.7 Common Mistakes in Performance Evaluation
This list is frequently asked and is also the most practically useful part of the unit.
- No stated goal — measuring whatever is easy to measure.
- Unfair or weak baseline — comparing an optimized new system against an unoptimized or badly configured old one (the straw-man fallacy).
- Wrong or single metric — reporting throughput while ignoring latency, or reporting only the mean while hiding a terrible tail.
- Unrepresentative workload — testing with tiny inputs, or only on the best-case data.
- Single run — one measurement is an anecdote; variation is unknown.
- Ignoring warm-up effects — including cold caches, JIT compilation or page faults in the measurement.
- Uncontrolled environment — background processes, thermal throttling, network traffic and other users affecting results.
- Measurement overhead (probe effect) — the profiler itself changing the behaviour measured.
- Omitting variability — reporting a single number with no standard deviation or confidence interval.
- Improper statistics — averaging ratios incorrectly (use the geometric mean for speedup ratios, the harmonic mean for rates).
- Confusing statistical with practical significance — a 0.4% improvement that is statistically real but operationally useless.
- Over-generalizing — claiming results hold on all hardware and workloads when only one was tested.
- Selective reporting — omitting the experiments where the method performed poorly.
- Irreproducible reporting — not stating versions, parameters, seeds or data sources.
10.8 Presenting Performance Results
- Use graphs with clearly labelled axes and units; state the number of repetitions.
- Show error bars, box plots or confidence intervals — never a bare bar chart of single runs.
- Use log scales when values span orders of magnitude.
- Report percentiles for latency; means hide the tail that users actually notice.
- Provide a table of the exact experimental configuration for reproducibility.
11. Putting It Together: A Worked Example
A research group claims: “Our new channel-assignment algorithm improves evening throughput in dense Wi-Fi deployments.” Unit II tells us what is required before this claim can be accepted.
| Element of Unit II | Application |
|---|---|
| Claim | Evening throughput improves under the new channel-assignment algorithm. |
| Evidence | Four weeks of measurement across four hostels, three repetitions per point. |
| Warrant | A statistically significant improvement measured under an identical workload with all other factors controlled indicates that the algorithm caused the improvement. |
| Qualifier | For 2.4 GHz dense deployments during 20:00–23:00 hrs, throughput improved by 23% (95% CI: 19–27%). |
| Rebuttal | In deployments where the upstream link, not the air interface, is the bottleneck, no improvement is expected. |
| Theoretical model | Access points as vertices, interference as edges; channel assignment reduced to graph colouring. |
| Mathematical proof | The greedy colouring algorithm terminates, and never assigns the same channel to two adjacent access points — proved by loop invariant. Complexity O(V+E). |
| Demonstration | A working implementation deployed on two access points showed improved throughput — proving feasibility. |
| Empirical proof | Repeated measurement over four weeks and four hostels, compared against the vendor's default assignment as baseline, analysed with a paired t-test. |
| Mathematical modelling | An M/M/1 model of the shared channel predicted latency at various device counts; predictions were compared with measurements to validate the model. |
| Performance evaluation | Metrics: median throughput and 95th-percentile latency. Workload: real hostel traffic including examination week. Baseline: vendor default. Repetitions: three. Warm-up discarded. |
| Dialectic | The first submission was rejected for reporting a 40% improvement from the single best run. After the reviewer's objection, correct statistics reduced the figure to 23% — and it was accepted. |
The lesson of this example — worth stating in any long answer — is that research does not reward the largest number; it rewards the number that survives an argument.
12. Chapter Summary
- Computing science has three paradigms — theory, abstraction and design — and therefore three corresponding proof methods.
- Dialectic means truth is reached through claim, opposition and refined synthesis; peer review, replication and benchmarking are its practical forms.
- An argument (Toulmin model) has six parts: claim, evidence, warrant, backing, qualifier and rebuttal. The warrant — the bridge from evidence to claim — is the part students omit.
- Types of argument: deductive, inductive, abductive, by analogy, by authority, by counterexample.
- Demonstration proves possibility, empirical proof proves practical generality, mathematical proof proves certainty. Good research combines them.
- Mathematical proof techniques include direct, contraposition, contradiction, induction, cases and construction.
- Deduction moves from general to specific and is certain; induction moves from specific to general and is probable. Mathematical induction is deductive despite its name.
- The theoretical approach abstracts a problem into a formal model (automata, graphs, logic, complexity classes) and proves results that hold universally.
- The algorithmic approach requires three things: correctness, termination and a complexity bound.
- The software engineering approach studies systems, processes and people using experiments, case studies, surveys, SLRs and repository mining, and must always report threats to validity.
- Mathematical modelling represents a system by equations; models must be both verified (built right) and validated (right model). Key results: M/M/1 queueing and Little's Law.
- Performance evaluation requires a goal, correct metrics, a representative workload, a fair baseline, repetitions and honest statistics. Amdahl's Law bounds achievable speedup.
13. Glossary of Key Terms
| Term | Meaning |
|---|---|
| Dialectic | Reaching truth through claim, counter-claim and synthesis. |
| Thesis / Antithesis / Synthesis | The initial claim, its opposition, and the refined resulting position. |
| Claim | The conclusion the researcher asks the reader to accept. |
| Warrant | The reasoning connecting evidence to claim. |
| Qualifier | Words limiting the strength or scope of a claim. |
| Rebuttal | Stated conditions under which the claim would not hold. |
| Demonstration | Proof by constructing a working artifact. |
| Empirical proof | Proof by systematic measurement over many cases. |
| Mathematical proof | Proof by logical derivation from axioms and definitions. |
| Deduction | Reasoning from general to specific; conclusion is certain. |
| Induction | Reasoning from specific to general; conclusion is probable. |
| Abduction | Inference to the most plausible explanation. |
| Validity (argument) | The conclusion follows logically from the premises. |
| Soundness | Validity plus premises that are actually true. |
| Loop invariant | A property preserved by every iteration, used to prove correctness. |
| Partial correctness | If the algorithm terminates, its output is correct. |
| Total correctness | Partial correctness together with proof of termination. |
| Reduction | Transforming one problem into another to transfer hardness or ease. |
| Abstraction | Deliberately removing detail irrelevant to the question. |
| Model checking | Exhaustive automatic exploration of a finite state space. |
| Amortized analysis | Average cost per operation over a worst-case sequence. |
| Baseline | The existing method against which a new method is compared. |
| Workload | The set of inputs or requests applied during evaluation. |
| Benchmark | A standard workload allowing comparison across studies. |
| Probe effect | Distortion of results caused by the measuring instrument. |
| Verification (model) | Checking the model is implemented correctly. |
| Validation (model) | Checking the model agrees with the real system. |
| Utilization (ρ) | Fraction of time a resource is busy, λ/μ. |
| Little's Law | L = λW; relates population, arrival rate and residence time. |
| Amdahl's Law | Speedup is bounded by the sequential fraction of a program. |
| Speedup / Efficiency | T1/Tn and S/n respectively. |
| Threats to validity | Internal, external, construct and conclusion validity. |
14. Examination Practice Questions
14.1 Very Short Answer (2 marks each)
- Define dialectic in the context of research.
- State the three paradigms of computing science.
- What is a warrant in the Toulmin model of argument?
- Differentiate between validity and soundness of an argument.
- Distinguish between mathematical induction and inductive reasoning.
- What is a proof by counterexample? Give an example.
- Define partial correctness and total correctness.
- What is a loop invariant?
- State Amdahl's Law and explain what it implies.
- State Little's Law and give one application.
- What is meant by the probe effect?
- Differentiate between verification and validation of a model.
- Define speedup and efficiency in parallel computing.
- What is a baseline in performance evaluation, and why must it be fair?
- What is meant by state-space explosion?
14.2 Short Answer (5 marks each)
- Explain the dialectical nature of research in computing science with suitable examples.
- Explain the six components of the Toulmin model of argument using one running example.
- Compare demonstration, empirical proof and mathematical proof.
- Explain any five techniques of mathematical proof used in computer science.
- Differentiate between deductive and inductive reasoning with computing examples.
- Explain the hypothetico-deductive cycle of research.
- What is abstraction? Explain its role in theoretical computer science with an example.
- Explain the steps involved in mathematical modelling.
- Explain the M/M/1 queueing model and what it tells us about heavily utilized servers.
- Describe any five research methods used in empirical software engineering.
- Explain the four types of threats to validity in an empirical study.
- What is workload characterization? Why is a representative workload essential?
- List and explain any six common mistakes in performance evaluation.
- Explain the logical fallacies that a researcher must avoid.
14.3 Long Answer (10 marks each)
- Explain the dialectic of research in computing science. Discuss models of argument and explain how a research paper is structured as an argument.
- Explain in detail the three proof methods used in computing science — demonstration, empirical and mathematical — with their characteristics, strengths, limitations and suitable examples. State which method is appropriate for which type of research question.
- Explain deduction and induction with reference to computer science research. Compare them in detail and explain how both are used together in the research process.
- Discuss the theoretical approach to research in computing science. Explain the important formal models and the role of formal methods and verification.
- Explain the algorithmic approach to computing research. Discuss algorithm design paradigms, methods of proving correctness, and complexity analysis.
- Discuss software engineering research approaches. Explain the various empirical methods used and the measurement and validity issues involved.
- What is mathematical modelling? Explain its steps, classification, common models used in computing, and its advantages and limitations.
- Explain performance estimation and evaluation. Discuss performance metrics, the three evaluation techniques, and the common mistakes made in performance studies.
- Compare analytical modelling, simulation and measurement as techniques of performance evaluation. Under what circumstances is each preferred?
- Take any research claim in computer science and show how you would establish it using an appropriate combination of argument structure, proof method and performance evaluation.
- Unit II is heavy on comparison questions. Learn the three comparison tables (proof methods; deduction vs. induction; modelling vs. simulation vs. measurement) thoroughly — they alone cover a large share of the marks.
- Learn the formulas: Amdahl's Law, Little's Law, M/M/1 utilization and waiting time, speedup and efficiency. Write the formula, define every symbol, then interpret it in one sentence.
- Draw the Toulmin diagram and the hypothetico-deductive cycle wherever relevant.
- Always give a computer-science example — algorithms, networks, databases, benchmarks. Generic examples reduce marks in a CS paper.
- In every long answer, close with the connecting idea: the method chosen must match the question asked.